import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import login from '@/components/login'
import index from '@/components/index'

import projectList from '@/views/project/projectList'
import projectInfo from '@/views/project/projectInfo'
import addProject from '@/views/project/addProject'
import bannerList from '@/views/project/bannerList'


import person from '@/views/member/person'
import mech from '@/views/member/mech'
import addMech from '@/views/member/addMech'
import Uncertified from '@/views/member/Unauthorized'

import carryCoin from '@/views/recharge/carryCoin'
import chargeCoin from '@/views/recharge/chargeCoin'

import equity from '@/views/bonus/equity'
import equityInfo from '@/views/bonus/equityInfo'


import logopt from '@/views/system/logopt'
import paraset from '@/views/system/paraset'
import roleManage from '@/views/system/roleManage'
import userManage from '@/views/system/userManage'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/index',
      name: 'index',
      component: index,
      children: [{
          path: "",
          name: 'HelloWorld',
          component: HelloWorld
        },
        {
          path: "/projectList",
          name: 'projectList',
          component: projectList,
          meta: ['项目管理', '项目列表'],
        },
        {
          path: "/addProject",
          name: 'addProject',
          component: addProject,
          meta: ['项目管理', '新增项目'],
        },     
        {
          path: "/projectInfo",
          name: 'projectInfo',
          component: projectInfo,
          meta: ['项目管理', '项目详情'],
        },
        {
          path: "/bannerList",
          name: 'bannerList',
          component: bannerList,
          meta: ['项目管理', '轮播图管理'],
        },
        {
          path: "/person",
          name: 'person',
          component: person,
          meta: ['会员管理', '个人'],
        },
        {
          path: "/mech",
          name: 'mech',
          component: mech,
          meta: ['会员管理', '机构'],
        },
        {
          path: "/addMech",
          name: 'addMech',
          component: addMech,
          meta: ['会员管理', '新增机构'],
        },
        {
          path: "/Uncertified",
          name: 'Uncertified',
          component: Uncertified,
          meta: ['会员管理', '未认证用户'],
        },

        {
          path: "/carryCoin",
          name: 'carryCoin',
          component: carryCoin,
          meta: ['充值管理', '充币'],
        },
        {
          path: "/chargeCoin",
          name: 'chargeCoin',
          component: chargeCoin,
          meta: ['充值管理', '提币'],
        },
        {
          path: "/equity",
          name: 'equity',
          component: equity,
          meta: ['权益分配'],
        },
        {
          path: "/equityInfo",
          name: 'equityInfo',
          component: equityInfo,
          meta: ['权益分配', '项目管理']
        },
        {
          path: "/paraset",
          name: 'paraset',
          component: paraset,
          meta: ['系统管理', '参数设置'],
        },
        {
          path: "/logopt",
          name: 'logopt',
          component: logopt,
          meta: ['系统管理', '操作日志'],
        },
        {
          path: "/userManage",
          name: 'userManage',
          component: userManage,
          meta: ['系统管理', '用户管理'],
        },
        {
          path: "/roleManage",
          name: 'roleManage',
          component: roleManage,
          meta: ['系统管理', '角色管理'],
        }
      ]
    }
  ]
})
